package com.woniu.userservice.service;

import com.woniu.userservice.entity.Positions;
import java.util.List;

public interface PositionsService {

    Positions queryById(Integer id);

    List<Positions> queryAllByLimit(int offset, int limit);

    List<Positions> findAll();

    Positions insert(Positions positions);

    Positions update(Positions positions);

    boolean deleteById(Integer id);

    /**
     * 查询该用户是否存在默认地址
     *
     * @param userid
     * @return
     */
    List<Positions> findById(Integer userid);

    /**
     * 存储地址
     *
     * @param positioninfo
     * @param receivername
     * @param phonenumber
     * @param postnumber
     * @param isdefault
     * @param userid
     */
    void insertMsg(String positioninfo, String receivername, String phonenumber, Integer postnumber, Integer isdefault, Integer userid);

    void insertMsgTwo(String positioninfo, String receivername, String phonenumber, Integer postnumber, Integer isdefault, Integer userid);

    void updateByIsdefault();

    List<Positions> findByUid(Integer uid);

    List<Positions> findByOneUid(Integer uid);

    Boolean deleteByuserId(Integer id, Integer userid);

    void updateByIsdefaultOne(Integer userid);

    void insertMsgThree(String positioninfo, String receivername, String phonenumber, Integer postnumber, Integer isdefault, Integer userid);
}